﻿@{
    Layout = "~/Views/Shared/_Content.cshtml";
}

@section HeadSection{
    <script src="/scripts/jquery-1.8.3.min.js"></script>
    <script src="/Scripts/My97DatePicker/WdatePicker.js?@ViewBag.StaticVersion"></script>
    <style type="text/css">
        .layui-table-page {
            position: fixed;
        }
    </style>
}

<div class="layui-form">
    <blockquote class="layui-elem-quote quoteBox">
        <form class="layui-form">
            <div class="layui-inline">
                <div class="layui-input-inline">
                    支付时间：
                </div>
                <div class="layui-input-inline">
                    <input style="width:150px" class="layui-input" onfocus="WdatePicker({ maxDate:'@(DateTime.Now.ToString("yyyy-MM-dd"))',dateFmt:'yyyy-MM-dd'})" value="@DateTime.Now.ToString("yyyy-MM-dd")" type="text" id="date" name="date" />
                </div>
                <a class="layui-btn search_btn" id="search_btn" data-type="reload">搜索</a>
            </div>
        </form>
    </blockquote>
    <div id="ProfitAnalysisList">
        @Html.Action("ProfitAnalysisData", "CountData", new { date = DateTime.Now.ToString("yyyy-MM-dd") })
    </div>
</div>

<script type="text/javascript">
$(function () {
    $("#search_btn").click(function () {
        $.ajax({
            type: "post",
            url: "/CountData/ProfitAnalysisData",
            data: { "date": $("#date").val() },
            dataType: 'html',
            success: function (html) {
                if (html != null && html != "") {
                    $("#ProfitAnalysisList").empty();
                    $("#ProfitAnalysisList").html(html);
                }
            }
        });

    });
});
</script>